package com.zhy.springcloud.service.impl;

import com.zhy.springcloud.dao.AccountDao;
import com.zhy.springcloud.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

/**
 * @Author zhy
 * @Description
 * @ClassName AccountServiceImpl
 * @Date 2021/1/8 13:44
 **/
@Service
@Slf4j
public class AccountServiceImpl implements AccountService {

    @Resource
    private AccountDao accountDao;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        log.info("--------------------->account-service 中扣减库存开始");

        accountDao.decrease(userId,money);

        log.info("--------------------->account-service 中扣减库存结束");


    }
}
